!{include file='common/iheader.htm'}
<div id="i_nav">
	<h3 class="page_title">分类编辑</h3>
	<a class="button" href="/admin.php?app=widget&act=cate_list">分类管理</a> 
</div>
<form method="post" id="widget_cate_form" class="form">
	<div class="form_item">
		<strong>分类名称：</strong>
		<div><input class="text_input" maxlength="50" type="text" name="name" value="!{$cate.name}"/></div>
		<p>(分类名称长度应该在1至50之间)</p>
	</div>
	<div class="form_item">
		<strong>分类编码：</strong>
		<div>
			!{if $cate}
			<input maxlength="20" type="hidden" name="id" value="!{$cate._id}"/>!{$cate._id}
			!{else}
			<input class="text_input" maxlength="20" type="text" name="id" value="!{$cate._id}"/>
			!{/if}
		</div>
		<p>(以字母开头，仅可使用字母、数字及_)</p>
	</div>
	<div class="form_item">
		<strong>分类描述：</strong>
		<div><textarea name="desc">!{$cate.desc}</textarea></div>
	</div>
	<div class="form_item form_btn_item">
		<input class="button main" type="button" value="保存" />
	</div>
</form>
<script>
	$(function(){
		$("#widget_cate_form").ajax_form({
			'submit_btn' : '.main',
			'is_alert' : false
		});
	});
</script>
!{include file='common/ifooter.htm'}